package role;

import entity.Book;
import entity.Gift;
import interfaces.Customer;
import interfaces.Manager;

/**
 * 角色类
 * @author yy
 *
 */
public abstract class Role {
	private Manager mgr;
	private Customer cus;
	
	public Manager getMgr() {
		return mgr;
	}
	public void setMgr(Manager mgr) {
		this.mgr = mgr;
	}
	public Customer getCus() {
		return cus;
	}
	public void setCus(Customer cus) {
		this.cus = cus;
	}
	
	/**
	 * 图书入库
	 * @param book
	 * @param inNum
	 * @return
	 */
	public abstract boolean bookIn(Book book, int inNum);
	/**
	 * 图书出库
	 * @param book
	 * @param outNum
	 * @return
	 */
	public abstract boolean bookOut(Book book, int outNum);
	
	/**
	 * 显示图书
	 * @param book
	 * @param inNum
	 */
	public abstract void showBook(Book[] books);
	
	/**
	 * 添加图书
	 * @param book
	 * @param inNum
	 */
	public abstract boolean addBook(Book[] books, Book book);
	
	/**
	 * 结算图书
	 * @param book
	 */
	public abstract void checkBook(Book book);
	/**
	 * 购买图书
	 * @param book
	 * @param buyNum
	 * @return
	 */
	public abstract Book buyBook(Book book, int buyNum);
	/**
	 * 购买附赠品
	 * @param giftId
	 * @return
	 */
	public abstract Gift buyGift(int giftId);

}
